<template>
    <div class="order">
        <div class="title">催收管理</div>
        <div class="order-content">
            <label class="filterText">关键字</label>
            <el-input class="order-input-filter" placeholder="请输入姓名/身份证号/订单号" v-model="filter">
            </el-input>
            <el-button class="filter-button-search" type="primary" icon="search" @click="search">搜索</el-button>
            <el-table class="order-table" :data="tableData" empty-text="暂无搜索结果">
                <el-table-column prop="orderNo" label="订单编号" width="180">
                </el-table-column>
                <el-table-column prop="customerName" label="姓名" width="150">
                </el-table-column>
                <el-table-column prop="customerIdCard" label="身份证号" width="200">
                </el-table-column>
                <el-table-column prop="bankName" label="贷款银行" :filters="$store.state.bank" :filter-method="filterbank" filter-placement="bottom-end" width="150">
                </el-table-column>
                <el-table-column prop="amount" label="逾期金额" width="130">
                </el-table-column>
                <el-table-column prop="repaymentDate" label="还款日" sortable width="130">
                </el-table-column>
                <el-table-column label="操作" width="120">
                    <template scope="scope">
                        <el-button type="text" size="small">
                            <router-link :to="{path:'/AssetProtection/UrgeManageTab?orderNo='+scope.row.orderNo +'&customerIdCard='+scope.row.customerIdCard+'&isShow='+false}">查看</router-link>
                        </el-button>
                    </template>
                </el-table-column>
            </el-table>
            <div class="order-pagination">
                <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="tablePage.page" :page-sizes="[10, 20, 30, 40]" :page-size="tablePage.num" layout="sizes, prev, pager, next" :page-count="tablePage.pager">
                </el-pagination>
            </div>
        </div>
    </div>
</template>
<script>
export default {
    name: 'order',
    components: {},
    data() {
        return {
            filter: '',
            tableData: [],
            tablePage: {
                pager: 1, //总条数
                page: 1, //当前页数
                num: 10, //每页条数
            },
        }
    },
    methods: {
        getOverdueList(){
            this.$http.get('/overdue/collect/task/list',
            {
                params:{
                    keyword:this.filter
                }
            })
            .then((response)=>{
                this.tableData=response.data.data
            })
            .catch((error)=>{
                console.log(error)
            })
        },
    },
    mounted() {
        this.getOverdueList()
    }
}

</script>
<style lang="scss" scoped>
.order {
    padding: 10px 16px;

    .title {
        color: #99A9BF;
        font-size: 14px;
        line-height: 18px;
        margin: 8px 0px 10px 0px;
    }
    .order-content {
        background: #fff;
        padding: 20px;
        overflow: auto;
        position: absolute;
        bottom: 20px;
        left: 20px;
        right: 20px;
        top: 45px;
        .order-add-button {
            color: #fff;
        }
        .filterText {
            font-size: 14px;
            color: #475669;
            margin: 0px 5px 0px 15px;
        }
        .order-hr {
            margin: 20px 0px 30px 0px;
            background: #D3DCE6;
        }
        .order-input-selemanName {
            width: 190px;
            margin-bottom: 10px;
            .order-input-name {
                width: 90px;
            }
        }
        .order-input-filter {
            width: 285px;
        }
        .filter-button-search {
            margin-left: 30px;
        }
        .order-table {
            margin: 20px 0px;
        }
        .order-pagination {
            text-align: center;
        }
        .order-input-short {
            width: 160px;
        }
        a {
            color: #20a0ff;
        }
    }
}

</style>
